<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j"%>
<%@taglib prefix="rich" uri="http://richfaces.org/rich"%>

<!DOCTYPE html>
<f:view locale="#{languageBean.locale}">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title><h:outputText value="#{msg.pagina_principale} #{patientBean.nome} - #{patientBean.cognome}" /></title>
            <link href="<% out.print(request.getContextPath());%>/resources/css/position.css" rel="stylesheet" type="text/css" />

        </head>
        <body>

            <jsp:include page="/pages/fragments/header.jsp" />


            <jsp:include page="/pages/fragments/patientMenu.jsp" />

            <section>
                <a4j:form>
                    <rich:panel>
                        <h:outputText value="#{msg.spiegazione_servizio_mail}" />
                        <h:panelGrid columns="3">

                            <h:outputLabel value="#{msg.nuova_mail}" />
                            <h:inputText value="#{mailChangeBean.newMail}" 
                                           id="newMail"
                                           required="true"
                                           requiredMessage="#{msg.required_text_error}"
                                           validatorMessage="#{msg.mail_validator}"
                                           >
                                <f:validator validatorId="MailValidator" />
                            </h:inputText>
                            <h:message for="newMail" errorClass="error-message"/>


                            <h:commandButton value="#{msg.procedi}" action="#{mailChangeBean.cambiaMail}" />
                        </h:panelGrid>
                    </rich:panel>
                </a4j:form>
            </section>
    </html>
</f:view>
